import pandas as pd 
import numpy as np 
import matplotlib.pyplot as plt
import seaborn as sns
df = pd.read_csv(r"DSProject\csv\genre_rating_votes.csv")
sns.set_theme()
fig1,ax1 = plt.subplots(figsize = (6,9))
sns.barplot(data = df, x ="total_average_rating",y = "genres",hue = "genres",ax =ax1,orient='h')

plt.savefig(r"DSProject\View\Figure\genres_rating.png", dpi=300, bbox_inches="tight")

plt.close()
fig2,ax2 = plt.subplots(figsize = (6,9))
sns.barplot(data = df, x ="average_votes",y = "genres",hue = "genres",ax =ax2,orient='h')

plt.savefig(r"DSProject\View\Figure\genres_votes.png", dpi=300, bbox_inches="tight")

plt.close()

